package com.qhg.saas_server.mapper;

import com.qhg.saas_server.pojo.RoadStore;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoadStoreMapper {

    /**
     * 批量增加路线的roadStore信息
     * @param roadId
     * @param list
     */
    void insertByList(@Param("roadId") Integer roadId, @Param("list") List list);

    /**
     * 根据roadId全部删除roadStore信息
     * @param roadId
     */
    void delete(@Param("roadId") Integer roadId);

    /**
     * 根据roadId,storeId删除roadStore中单条记录
     * @param roadId
     * @param storeId
     */
    void deleteRoadDetil(@Param("roadId") Integer roadId, @Param("storeId") Integer storeId);

    /**
     * 根据roadId,storeId查询 roadStore信息
     * @param roadId
     * @param storeId
     * @return
     */
    RoadStore selectByRoadIdAndStoreId(@Param("roadId") Integer roadId, @Param("storeId") Integer storeId);

    /**
     * 根据roadId,和序列号  使得该路线中的store信息的序列号跟新(大于这个序列号的减一)
     * @param roadId
     * @param serial
     */
    void updateSerial(@Param("roadId") Integer roadId,@Param("serial") Integer serial);
}
